//
//  HistoryLog.h
//  iMed
//
//  Created by Barry Press on 10/28/09.
//  Copyright 2009 Barry Press. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "History.h"
#import "Constants.h"

@class DataSet;

@interface HistoryLog : NSObject <NSCoding> {
	NSMutableArray *histories;
}
- (HistoryLog*)sortedHistoryForRX:(RX*)anRX;
- (History*)priorRXHistory:(RX*)anRX;
- (History*)previousDayRXHistory:(RX*)anRX forHistory:(History*)aHistory 
					   inDataSet:(DataSet*)ds returnsCount:(int*)aCount
				 andNewerHistory:(History**)newerHistory;
- (HistoryLog*)sortedByDate;

- (void)addObject:(History*)aHistory;
- (int)count;
- (History*)lastObject;
- (History*)objectAtIndex:(int)index;
- (void)removeAllObjects;
- (void)removeObject:(NDCitem*)anObject;

@property (readwrite, retain) NSMutableArray* histories;

@end
